/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package strategies;

import exceptions.DatabaseException;
import wrappers.CountryWrap;

/**
 *
 * @author KAV
 */
public class CountriesEditPageStrategy extends EditPageStrategy {

    @Override
    protected void commitRow(Object e) throws DatabaseException {
        CountryWrap ew;
        if (e == null) {
            ew = new CountryWrap();
        } else {
            ew = (CountryWrap) e;
        }
        op.putBlockLabel("edit_title", "Title");
        op.putTextField("edit_title", ew.getTitle());
    }

    @Override
    protected Object writeInfo() {
        CountryWrap ew = (CountryWrap) e;
        return ew;
    }
}
